home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / SHARED.DIR / 03127_Script_PRINTOMATIC MDESCRIBE < prev    next >
Text File  |  1996-04-01  |  8KB  |  249 lines

  1. -- -----------------------------------------------------------
  2. -- printomatic(mdescribe) 
  3. --
  4. --  STANDARD METHODS
  5. --I      mNew
  6. --X      mDispose
  7. --
  8. --  DOCUMENT ATTRIBUTES
  9. --X      mReset
  10. --I      mNewPage
  11. --XI     mSetPage, pageNum
  12. --IIIII  mSetMargins, left, top, right, bottom
  13. --X      mSetPrintableMargins
  14. --I      mGetPageWidth
  15. --I      mGetPageHeight
  16. --I      mGetPaperWidth
  17. --I      mGetPaperHeight
  18. --
  19. --  GRAPHICS STATE
  20. --XIII   mSetColor, r, g, b    (scale = 0-255)
  21. --XI     mSetGray, grayLevel   (scale = 0-100)
  22. --XII    mSetPenSize, h, v
  23. --XS     mSetTextFont, fontName
  24. --XI     mSetTextSize, fontSize
  25. --XS     mSetTextStyle, styleNames
  26. --XS     mSetTextJust, [ right | left | centered ]
  27. --
  28. --  TEXT ELEMENTS
  29. --XIIIII mTextBox, left, top, right, bottom, linkedToPrevious
  30. --V      mSetText, textString [, autoAppend]
  31. --V      mAppendText, textString [, autoAppend]
  32. --V      mAppendTextFile, fileName [, autoAppend]
  33. --V      mAppendTextResource, id | name [, autoAppend]
  34. --ISII   mDrawText, text, startH, startV
  35. --S      mGetInsertionPoint
  36. --
  37. --  GRAPHIC ELEMENTS
  38. --XIIII  mStrokedRect, left, top, right, bottom
  39. --XIIII  mFilledRect, left, top, right, bottom
  40. --XIIIII mStrokedRoundRect, left, top, right, bottom, cornerRadius
  41. --XIIIII mFilledRoundRect, left, top, right, bottom, cornerRadius
  42. --V      mStrokedOval [, left, top, right, bottom | , centerH, centerV, radius ]
  43. --V      mFilledOval [, left, top, right, bottom | , centerH, centerV, radius ]
  44. --XIIII  mLine, startH, startV, endH, endV
  45. --V      mPicture, pict | pictFile | pictResID, left, top [ , right, bottom ]
  46. --V      mStagePicture, left, top , right, bottom [,clipLeft ,clipTop ...] 
  47. --V      m1BitStagePicture, left, top , right, bottom [,clipLeft ,clipTop ...] 
  48. --V      mEPSFile, fileName, left, top , right, bottom
  49. --
  50. --  PRINTING
  51. --II     mSetLandscapeMode, trueOrFalse
  52. --XS     mSetDocumentName, name
  53. --I      mDoPageSetup
  54. --I      mDoJobSetup
  55. --XS     mSetProgressMsg, text
  56. --V      mSetProgressPict, pict
  57. --XII    mSetProgressLoc, left, top
  58. --I      mPrintPreview
  59. --V      mPrintPicts [, folder]
  60. --X      mPrint
  61. --
  62. --  SAVING TO DISK
  63. --ISISS  mSavePageSetup, fileName, resID, fileType, fileCreator
  64. --ISI    mGetPageSetup, fileName, resID
  65. --
  66. --  MISCELLANEOUS
  67. --XI     mHideMessages, trueOrFalse
  68. --IS     mSetPageNumSymbol, symbol
  69. --IS     mRegister, serialNumber
  70. --
  71. -- the following are the print text handlers of the printomatic example movie
  72. --on mouseUp
  73. --  global printer
  74. --  
  75. --  if not objectP(printer) then
  76. --    Alert "There is no currently selected printer. Printing features are disabled."
  77. --  else
  78. --    cursor 4  --because this much styled text takes a while to compile...
  79. --    
  80. --    printer (mReset)
  81. --    printer (mSetMargins,72,60,72,48)
  82. --    
  83. --    put printer(mGetPageWidth) into w
  84. --    put printer(mGetPageheight) into h
  85. --    
  86. --    printer (mSetPageNumSymbol,"▐")
  87. --    
  88. --    printer (mSetTextFont,"helvetica")
  89. --    printer (mSetTextSize,10)
  90. --    printer (mSetTextStyle,"normal,italic")
  91. --    
  92. --    --page header left side
  93. --    printer (mSetTextJust,"left")
  94. --    printer (mDrawText,"PrintOMatic XObject Documentation",0,8)
  95. --    
  96. --    --page header right side
  97. --    printer (mSetTextJust,"right")
  98. --    printer (mDrawText,"printed"&&the date,w,8)
  99. --    
  100. --    --page header line underneath
  101. --    printer (mLine,0,11,w,11)
  102. --    
  103. --    --page footer right side
  104. --    printer (mDrawText,"page ▐",w,h-2)
  105. --    
  106. --    --the body pages
  107. --    printer (mSetTextJust,"left")
  108. --    
  109. --    --page 1
  110. --    
  111. --    --block out the header with a white rectangle
  112. --    printer (mNewPage)
  113. --    printer (mSetGray,0)
  114. --    printer (mFilledRect,0,0,w+5,12)
  115. --    
  116. --    --place the picture
  117. --    if the machineType = 256 then
  118. --      printer (mSetGray,50)
  119. --      printer (mFilledRect,0,60,w/2,220)
  120. --    else
  121. --      printer (mPicture,the picture of cast "illustration" 0,60,w/2,220)
  122. --    end if
  123. --    printer (mSetGray,100)
  124. --    
  125. --    --wrap the text around the picture
  126. --    printer (mTextBox,0,0,w,50,false)
  127. --    printer (mTextBox,0,240,w,h-40,true)
  128. --    
  129. --    --page 2
  130. --    printer (mNewPage)
  131. --    printer (mTextBox,0,30,w,h-24,true)
  132. --    --page 3
  133. --    printer (mNewPage)
  134. --    printer (mTextBox,0,30,w,h-24,true)
  135. --    --page 4
  136. --    printer (mNewPage)
  137. --    printer (mTextBox,0,30,w,h-24,true)
  138. --    --page 5
  139. --    printer (mNewPage)
  140. --    printer (mTextBox,0,30,w,h-24,true)
  141. --    --page 6
  142. --    printer (mNewPage)
  143. --    printer (mTextBox,0,30,w,h-24,true)
  144. --    --page 7
  145. --    printer (mNewPage)
  146. --    printer (mTextBox,0,30,w,h-24,true)
  147. --    --page 8
  148. --    printer (mNewPage)
  149. --    printer (mTextBox,0,30,w,h-24,true)
  150. --    --page 9
  151. --    printer (mNewPage)
  152. --    printer (mTextBox,0,30,w,h-24,true)
  153. --    --page 10
  154. --    printer (mNewPage)
  155. --    printer (mTextBox,0,30,w,h-24,true)
  156. --    
  157. --    --flow the body text
  158. --    
  159. --    AppendTitleText (the text of cast "docTitle")
  160. --    put the number of cast "docTitle" + 1 into curCast
  161. --    
  162. --    repeat while the castType of cast curCast = #text
  163. --      if the name of cast curCast = "section" then
  164. --        AppendSectionText(the text of cast curCast)
  165. --      else if the name of cast curCast = "methodList" then
  166. --        AppendMethodListText(the text of cast curCast)
  167. --      else if the name of cast curCast = "method" then
  168. --        AppendMethodText(the text of cast curCast)
  169. --      else if the name of cast curCast = "note" then
  170. --        AppendNoteText(the text of cast curCast)
  171. --      else
  172. --        AppendText(the text of cast curCast)
  173. --      end if
  174. --      put curCast + 1 into curCast
  175. --    end repeat
  176. --    
  177. --    if word 1 of the text of cast (the castnum of sprite (the clickOn)) = "Preview" then
  178. --      printer (mPrintPreview)
  179. --    else
  180. --      if printer(mDoJobSetup) = true then
  181. --        updatestage
  182. --        printer (mPrint)
  183. --      end if
  184. --    end if
  185. --    
  186. --    cursor -1
  187. --    
  188. --  end if
  189. --  
  190. --end mouseUp
  191. --
  192. --
  193. --on AppendTitleText txt
  194. --  global printer,gPropFont
  195. --  printer (mSetTextFont,gPropFont)
  196. --  printer (mSetTextStyle,"bold")
  197. --  printer (mSetTextSize,14)
  198. --  printer (mAppendText,line 1 of txt&return)
  199. --  printer (mSetTextStyle,"normal")
  200. --  printer (mSetTextSize,10)
  201. --  printer (mAppendText,line 2 to (the number of lines in txt) of txt)
  202. --end
  203. --
  204. --on AppendSectionText txt
  205. --  global printer,gPropFont
  206. --  printer (mSetTextFont,gPropFont)
  207. --  printer (mSetTextStyle,"bold")
  208. --  printer (mSetTextSize,12)
  209. --  printer (mAppendText,line 1 of txt&return)
  210. --  printer (mSetTextStyle,"normal")
  211. --  printer (mSetTextSize,10)
  212. --  printer (mAppendText,line 2 to (the number of lines in txt) of txt)
  213. --end
  214. --
  215. --on AppendMethodListText txt
  216. --  global printer,gMonoFont
  217. --  printer (mSetTextFont,gMonoFont)
  218. --  printer (mSetTextStyle,"normal")
  219. --  printer (mSetTextSize,9)
  220. --  printer (mAppendText,txt)
  221. --end
  222. --
  223. --on AppendMethodText txt
  224. --  global printer,gPropFont
  225. --  printer (mSetTextFont,gPropFont)
  226. --  printer (mSetTextStyle,"bold")
  227. --  printer (mSetTextSize,10)
  228. --  printer (mAppendText,word 1 of txt&" ")
  229. --  printer (mSetTextStyle,"normal")
  230. --  printer (mAppendText,word 2 to (the number of words in txt) of txt & return & return)
  231. --end
  232. --
  233. --on AppendNoteText txt
  234. --  global printer,gPropFont
  235. --  printer (mSetTextFont,gPropFont)
  236. --  printer (mSetTextStyle,"italic")
  237. --  printer (mSetTextSize,10)
  238. --  printer (mAppendText,txt)
  239. --end
  240. --
  241. --on AppendText txt
  242. --  global printer,gPropFont
  243. --  printer (mSetColor,255,0,0);
  244. --  printer (mSetTextFont,gPropFont)
  245. --  printer (mSetTextStyle,"normal")
  246. --  printer (mSetTextSize,10)
  247. --  printer (mAppendText,txt)
  248. --  printer (mSetGray,100)
  249. --end